/**
 * Created by Blink on 2017/8/18.
 * text component
 */

import React from 'react';
import {StyleSheet, Text} from 'react-native';
import PropTypes from 'prop-types';
import ComponentBase from '../component.base';

export default class BlinkText extends ComponentBase {
    static propTypes = {
        ...ComponentBase.propTypes,
        size: PropTypes.number,
    };

    static defaultProps = {
        color: 'black',
        size: 16,
    };

    get _componentName() {
        return 'text';
    }

    render() {
        const {style, children, color, size, ...other} = this.props;

        return <Text {...other}
                     style={[
                         this._color,
                         {fontSize: size},
                         style
                     ]
                     }>{children}</Text>
    }
}